const joi = require('joi')

exports.news_list_schema ={
    query: {
        page: joi.string().pattern(/^[1-9]\d*$/).message('page必须是正整数'),
        limit: joi.string().pattern(/^[1-9]\d*$/).message('limit必须是正整数'),
        cate_id: joi.string().pattern(/^\d*$/),
        title: joi.string().empty('').default('')
    }
}